<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    request.setAttribute("basePath", basePath);
%>
<html>
<head>
    <meta charset="utf-8">
    <title>比赛报名</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${basePath}css/layui.css" media="all">
    <style type="text/css">
        body {
            text-align: center;
            padding-top: 10%;
        }

        #center_div {
            margin: 0 auto;
            padding: 50px;
        }

        .foot {
            z-index: 99;
            width: 100%;
            left: 0;
            position: absolute;
            bottom: 12px;
        }

        .footer .foot {
            text-align: center;
            font-size: 14px;
            color: gray
        }
    </style>
</head>
<body>
<form class="layui-form layui-form-pane" action="/RegServlet" method="post">
    <input type="hidden" name="action" value="login">
    <div class="layui-form-item">
        <div class="layui-inline" id="info">

        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">学号</label>
            <div class="layui-input-block">
                <input lay-verify="required" type="text" name="username" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input lay-verify="required" type="text" name="nickname" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input lay-verify="required|pass" id="password" type="password" name="password" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <button style="width: 270px;" type="submit" class="layui-btn layui-btn-fluid layui-bg-red" lay-submit=""
                    lay-filter="LAY-user-reg-submit">提&nbsp;&nbsp;交
            </button>
        </div>
    </div>
    <div class="layui-form-item">
        <p style="text-align: center; color: red">${msg}</p>
    </div>
</form>
<div class=footer>
    <div class=foot>
        <p>© 河北民族师范学院-大数据应用研发工作室-ACM爱好者协会 版权所有
    </div>
</div>
<script src="${basePath}js/layui.all.js" charset="utf-8"></script>
<script>
    layui.use('form', function () {
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        form.render();
    });
</script>
</body>
</html>
